package com.fun.demo.fun;

import java.util.*;
import java.util.function.Consumer;

public class MyTest {

        public static void  printValur(int x){

            System.out.println("print value : "+x);

        }



        public static void main(String[] args) {

//            List<Integer> al = Arrays.asList(1,2,3,4,5);
//
//           // al.forEach(MyTest::printValur);
//
//            //下面的方法和上面等价的
//
//            Consumer<Integer> methodParam = MyTest::printValur; //方法参数
//
//           al.forEach(x -> methodParam.accept(x));//方法执行accept

            Map map = new HashMap();

            System.out.println("map :" + map.toString());

            List list = new ArrayList();

            System.out.println("list : " + list.toString());


        }


}
